import App from './App'
import uView from '@/uni_modules/uview-ui'
import jumpUtil from '@/common/JumpUtil.js'
import store from "./store"
import { formatMoneyToYuan,formatMoneyToFen} from "@/common/util.js";
import * as filters from "./filters"; // 全局filter
import {imageBaseUrl} from '@/common/const.js'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

Vue.use(uView)
// 跳转
Vue.prototype.jumpUtil = jumpUtil
Vue.prototype.formatMoneyToYuan = formatMoneyToYuan
Vue.prototype.formatMoneyToFen = formatMoneyToFen
Vue.prototype.imageBaseUrl = imageBaseUrl

//加载过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});


const app = new Vue({
  ...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif